﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace UrTransPayloadWpf
{
    /// <summary>
    /// AddToolsDialog.xaml 的交互逻辑
    /// </summary>
    public partial class AddToolsDialog :  Window
    {
        IAddTools AddTools;
        public AddToolsDialog(IAddTools model)
        {
            AddTools = model;
            InitializeComponent();
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            if (ToolName.Text == "")
                MessageBox.Show("探头名字不能为空");
            else
            {
                AddTools.AddTool2List(ToolName.Text);
                this.Close();
            }

        }

        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            this.Close();
        }
    }
}
